#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int a[9] = {1,2,3,
	    4,5,6,
	    7,8,9};

int b[9] = {9,8,7,
	    6,5,4,
	    3,2,1};

int main(){

  const int largA = 9, altA = 1;
  const int largB = 1, altB = 9;
  int const largC = altA;
  int const altC = largB;
  int c[largC*altC];
  
  memset(&c,0,largC*altC);
  
  int i, j, k, x, indA, indB;
  
  for (i=0;i<largA;i++){
    for (j=0;j<altB;j++){
      for (k=0;k<largA;k++){
		
	indA = i*largA+k;
	indB = k*largB+j;
	x = a[indA] * b[indB];
	c[i*largC+j] += x;	
	
	printf("i = %d, j = %d, k = %d, x = %d, indA = %d, indB = %d\n", i,j,k,x,indA,indB);
	
      }
      printf("\n");
    }
  }

  
  
  return 0;
}